<div class="row">
<div class="button-container mb10">
<?php 
    echo Yii::app()->user->checkAccess('module|add')?CHtml::link('增加模块',$this->createUrl('module/add'),array('class'=>'button')):'';
    echo Yii::app()->user->checkAccess('module|updatecache')?CHtml::link('更新缓存',$this->createUrl('module/updatecache'),array('class'=>'button ml10')):'';
?>
</div>

<!--表格数据-->
<?php
//获取字段语言包
$aAttributeLabels = $this->oModel->attributeLabels();
?>
<table class="table table-bordered table-striped dataGrid">
        <thead>
            <tr>
                <th style="width: 80px;"><?php echo $aAttributeLabels['sort'] ?></th>
                <th><?php echo $aAttributeLabels['module_name'] ?></th>
                <th><?php echo $aAttributeLabels['module'] ?></th>
                <th><?php echo $aAttributeLabels['url'] ?></th>
                <th><?php echo $aAttributeLabels['version'] ?></th>
                <th><?php echo $aAttributeLabels['createtime'] ?></th>
				<th><?php echo $aAttributeLabels['updatetime'] ?></th>
                <th><?php echo $aAttributeLabels['disable'] ?></th>
				<th>操作</th>
            </tr>
        </thead>
        <tbody>	
        <?php foreach( $list as $aVal ){ ?>
            <tr>
                <td><input type="text" value="<?php echo $aVal['sort']; ?>" class="width20 ajaxOperateSort" url="<?php echo $this->createUrl('module/ajaxSort' ,array('module'=>$aVal['module'])) ?>" /></td>
                <td><?php echo $aVal['module_name'] ?></td>
				<td><?php echo $aVal['module'] ?></td>
				<td><?php echo $aVal['url'] ?></td>
                <td><?php echo $aVal['version'] ?></td>
                <td><?php echo Yii::app()->common->formattime('Y-m-d H:i:s' ,$aVal['createtime']); ?></td>	
                <td><?php echo Yii::app()->common->formattime('Y-m-d H:i:s' ,$aVal['updatetime']); ?></td>
                <td><span>
                <?php
                    echo Yii::app()->user->checkAccess('module|ajaxDisable') ? 
                         CHtml::link('禁用' ,'javascript:void(0)' ,array('url'=>$this->createUrl('module/ajaxDisable' ,array('module'=>$aVal['module'])) ,'class'=>'ajaxOperateReplace')) : '';
                ?></span></td>	
                <td>
                    <?php
                        echo Yii::app()->user->checkAccess('module|edit') ? 
                             CHtml::link('编辑' ,$this->createUrl('module/edit' ,array('module'=>$aVal['module']))) : '';
                        echo "\n";
                        echo Yii::app()->user->checkAccess('module|delete') ? 
                             CHtml::link('删除' ,'javascript:void(0);' ,array('url'=>$this->createUrl('module/delete' ,array('module'=>$aVal['module'])) ,'class'=>'delete')) : '';
                    ?>        
                </td>
            </tr>         
        <?php }?>              
        </tbody>
</table>
<!-- 分页page start -->
<div class="table-bottom-operate">
    <div class="inline pull-left table-operate">
    </div>
    <div class="inline pull-right page">
        <?php $this->widget('LinkPager',array('pages' => $pages)); ?>
    </div>
	
</div>
<!-- 分页page end -->
</div>
